home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / tm-view-en.info.z / tm-view-en.info
Encoding:
GNU Info File  |  1998-05-21  |  32.9 KB  |  992 lines

  1. This is Info file ../../info/tm-view-en.info, produced by Makeinfo
  2. version 1.68 from the input file tm-view-en.texi.
  3.  
  4. 
  5. File: tm-view-en.info,  Node: Top,  Next: Introduction,  Prev: (dir),  Up: (dir)
  6.  
  7. tm-view 7.80 Reference Manual (English Version)
  8. ***********************************************
  9.  
  10.    This file documents tm-view, a MIME Viewer for GNU Emacs.
  11.  
  12. * Menu:
  13.  
  14. * Introduction::                What is tm-view?
  15. * MIME display::                Structure of display in mime/viewer-mode
  16. * mime/viewer-mode::            Navigation in mime/viewer-mode
  17. * method::                      Mechanism of decoding
  18. * Two buffers for an article::  raw-article-buffer and preview-buffer
  19. * API::                         Functions to decode MIME message
  20. * Acknowledgments::
  21. * Concept Index::
  22. * Function Index::
  23. * Variable Index::
  24.  
  25. 
  26. File: tm-view-en.info,  Node: Introduction,  Next: MIME display,  Prev: Top,  Up: Top
  27.  
  28. What is tm-view?
  29. ****************
  30.  
  31.    The tm-view is a general MIME viewer running on GNU Emacs.
  32.  
  33.    tm-view provides the major-mode called `mime/viewer-mode' (*Note
  34. mime/viewer-mode::) to read MIME message for MUA.  MUA (*Note
  35. (tm-en)MUA::) implementer can use it to add MIME function.
  36.  
  37.    tm-view is a user interface kernel to view and navigate MIME message.
  38. tm-view drives some programs to navigate each content-type (*Note
  39. (tm-en)content-type::)s, they are called *method* (*Note method::).
  40. tm-view calls some programs to display each contents and headers in
  41. preview buffer, they are called *filter* (*Note Two buffers for an
  42. article::).  Method and filters are tm-view application program.  They
  43. expand tm-view to treat various kinds of MIME types.
  44.  
  45. 
  46. File: tm-view-en.info,  Node: MIME display,  Next: mime/viewer-mode,  Prev: Introduction,  Up: Top
  47.  
  48. Structure of display in mime/viewer-mode
  49. ****************************************
  50.  
  51.    In mime/viewer-mode (*Note mime/viewer-mode::), following are
  52. displayed for each parts:
  53.  
  54.          [content-button]
  55.          (content-header)
  56.      
  57.          (content-body)
  58.          (content-separator)
  59.  
  60.    You can change design or stop to display if you specify for each
  61. conditions, such as content-types.
  62.  
  63.    Example:
  64.  
  65.      From: morioka@jaist.ac.jp (MORIOKA Tomohiko)
  66.      Subject: Re: Question
  67.      Newsgroups: zxr.message.mime
  68.      Date: 22 Oct 93 11:02:44
  69.      Mime-Version: 1.0
  70.      Organization: Japan Advanced Institute of Science and Technology,
  71.              Ishikawa, Japan
  72.      
  73.      [1  (text/plain)]
  74.        How to compose MIME message in MIME-Edit mode.
  75.      
  76.        Press `C-c C-x ?' then help message will be displayed:
  77.      
  78.      C-c C-x C-t    insert a text message.
  79.      C-c C-x TAB    insert a (binary) file.
  80.      C-c C-x C-e    insert a reference to external body.
  81.      C-c C-x C-v    insert a voice message.
  82.      C-c C-x C-y    insert a mail or news message.
  83.      C-c C-x RET    insert a mail message.
  84.      C-c C-x C-s    insert a signature file at end.
  85.      C-c C-x t    insert a new MIME tag.
  86.      C-c C-x a    enclose as multipart/alternative.
  87.      C-c C-x p    enclose as multipart/parallel.
  88.      C-c C-x m    enclose as multipart/mixed.
  89.      C-c C-x d    enclose as multipart/digest.
  90.      C-c C-x s    enclose as PGP signed.
  91.      C-c C-x e    enclose as PGP encrypted.
  92.      C-c C-x C-k    insert PGP public key.
  93.      C-c C-x C-p    preview editing MIME message.
  94.      ...
  95.      
  96.      So press `C-c C-x C-i' and specify file name you want to include.
  97.      
  98.        MIME encoding for binary file is normally Base64.
  99.      
  100.      [2  (image/gif)]
  101.      
  102.      [3  (text/plain)]
  103.      
  104.        In this way, it is finish a message attaching a picture.
  105.      
  106.      ======================== A cup of Russian tea ========================
  107.      ============  * not by jam, not by marmalade, by honey *  ============
  108.      ============               MORIOKA Tomohiko               ============
  109.      =============== Internet E-mail: <morioka@jaist.ac.jp> ===============
  110.  
  111. * Menu:
  112.  
  113. * content-button::
  114. * content-header::
  115. * content-body::
  116. * content-separator::
  117.  
  118. 
  119. File: tm-view-en.info,  Node: content-button,  Next: content-header,  Prev: MIME display,  Up: MIME display
  120.  
  121. content-button
  122. ==============
  123.  
  124.    content-subject displays abstract for the part.  It is placed in top
  125. of the part.
  126.  
  127.    In default, it is displayed following design:
  128.  
  129.              [1.3 test (text/plain)]
  130.  
  131.    First number field represents position of a content in the part.  It
  132. is called *content-number*.  It can be considered as the chapter number
  133. in the message.
  134.  
  135.    Second string part represents title.  It is created by following:
  136.  
  137.   1. name paramater or x-name parameter in Content-Type field (*Note
  138.      (tm-en)Content-Type field::)
  139.  
  140.   2. Content-Description field (*Note (tm-en)Content-Description
  141.      field::) or Subject field
  142.  
  143.   3.  filename of uuencode
  144.  
  145.    If they are not exists, space is displayed.
  146.  
  147.    Third parenthesis part represents content-type/subtype of the part.
  148. If it is non-MIME part, `nil' is displayed.
  149.  
  150.    Content-button is used like icon when content-header (*Note
  151. content-header::) and content-body (*Note content-body::) are hidden.
  152. For example:
  153.  
  154.              [2  (image/gif)]
  155.  
  156. if you press `v' key, GIF image is displayed.
  157.  
  158.    If mouse operations are available, you can press content-button by
  159. mouse button-2 (center button of 3 button-mouse) to play, similarly to
  160. press `v' key. (cf. *Note mime/viewer-mode::)
  161.  
  162.    By the way, it is annoying to display content-button if
  163. content-header is displayed.  So tm-view provides a mechanism to
  164. specify conditions to display content-button.
  165.  
  166.  - Variable: mime-viewer/content-button-ignored-ctype-list
  167.      List of content-types.
  168.  
  169.      If content-type of a part is a member of this list, its
  170.      content-button is not displayed.
  171.  
  172. 
  173. File: tm-view-en.info,  Node: content-header,  Next: content-body,  Prev: content-button,  Up: MIME display
  174.  
  175. content-header
  176. ==============
  177.  
  178.    A content header displays the header portion of a part in the
  179. preview-buffer.  However it is annoying to display header for every
  180. parts, so tm-view provides a mechanism to specify its condition.
  181.  
  182.    When the function `mime-viewer/header-visible-p' returns `t' for
  183. reversed-content-number of a part, content-header is displayed.
  184.  
  185.    This judge function returns `t' when a part is root or content-type
  186. of its parent is a member of the variable
  187. `mime-viewer/childrens-header-showing-Content-Type-list'.
  188.  
  189.    If you want to change this condition, please redefine it.  Notice
  190. that it refers variable
  191. `mime-viewer/childrens-header-showing-Content-Type-list', however if
  192. you redefine function `mime-viewer/header-visible-p', it may not work.
  193. So if you want to redefine it, it should be refer variable
  194. `mime-viewer/childrens-header-showing-Content-Type-list'.
  195.  
  196.    When content-header is displayed, content-header are formated by the
  197. program called by *content-header-filter*.  Content-header-filter is
  198. searched from variable `mime-viewer/content-header-filter-alist'.  Its
  199. key is major-mode of the raw-article-buffer (*Note
  200. raw-article-buffer::).  If not found, function
  201. `mime-viewer/default-content-header-filter' is called.
  202.  
  203.  - Variable: mime-viewer/childrens-header-showing-Content-Type-list
  204.      List of content-types.  If content-type of parent of a part is a
  205.      member of this variable, its content-header is displayed.  Default
  206.      value is `'("message/rfc822" "message/news")'.
  207.  
  208.      This variable is referred by the function
  209.      `mime-viewer/header-visible-p'.
  210.  
  211.  - Function: mime-viewer/header-visible-p RCNUM CINFO &optional CTYPE
  212.      Returns `t' if a part which reversed-content-number is RCNUM in
  213.      content-info CINFO is displayed.
  214.  
  215.      If you know content-type, you can specify by CTYPE.
  216.  
  217.  - Variable: mime-viewer/content-header-filter-alist
  218.      Association-list whose key is major-mode of a raw-article-buffer,
  219.      value is content-header-filter.
  220.  
  221.  - Function: mime-viewer/default-content-header-filter
  222.      It is called when content-header-filter is not found in variable
  223.      `mime-viewer/content-header-filter-alist'.
  224.  
  225.      It refers `mime-viewer/ignored-field-regexp'.
  226.  
  227.  - Variable: mime-viewer/ignored-field-list
  228.      List of regular expression to represent invisible fields even if
  229.      content-header is displayed.
  230.  
  231.      Variable `mime-viewer/ignored-field-regexp' is created from it.
  232.  
  233.      Please use function `tm:add-fields' or `tm:delete-fields' to set
  234.      it.
  235.  
  236. 
  237. File: tm-view-en.info,  Node: content-body,  Next: content-separator,  Prev: content-header,  Up: MIME display
  238.  
  239. content-body
  240. ============
  241.  
  242.    *content-body* represents content of the part.
  243.  
  244.    tm-view does not display raw content body.  For example, if a content
  245. has binary, it is hidden.  If a content has text/enriched, it is
  246. formated.  Namely content body is hidden or formated.
  247.  
  248.    Function `mime-viewer/body-visible-p' is a judge function whether
  249. content-body of a content is displayed.  If it returns `nil',
  250. content-body is hidden.  In default, it returns non-`nil' when
  251. content-type of a part is a member of variable
  252. `mime-viewer/default-showing-Content-Type-list'.
  253.  
  254.    When content-body of a content is displayed, content-body is
  255. formated by *content-filter*.  Content-filter is searched from variable
  256. `mime-viewer/content-filter-alist'.  At this time, major-mode of the
  257. raw-article-buffer (*Note raw-article-buffer::) is used as the key.
  258.  
  259.    If it is not found, function `mime-viewer/default-content-filter' is
  260. called.
  261.  
  262.  - Variable: mime-viewer/default-showing-Content-Type-list
  263.      List of content-type.  If content-type of a part is a member of
  264.      this variable, its body is displayed.
  265.  
  266.  - Function: mime-viewer/body-visible-p RCNUM CINFO &optional CTYPE
  267.      Return non-`nil', if content-type of a part is displayed.  RCNUM
  268.      is reversed-content-number of a part.  CINFO is content-info of
  269.      the message.  If you know content-type of a part, you can specify
  270.      it as argument CTYPE.
  271.  
  272.  - Variable: mime-viewer/content-filter-alist
  273.      Association-list whose key is major-mode of a raw-article-buffer,
  274.      value is content-filter.
  275.  
  276.  - Function: mime-viewer/default-content-filter RCNUM CINFO CTYPE
  277.           PARAMS SUBJ
  278.      It is called when content-body of a part should be displayed and
  279.      content-filter is not found in `mime-viewer/content-filter-alist'.
  280.  
  281.      In default, it does nothing.
  282.  
  283. 
  284. File: tm-view-en.info,  Node: content-separator,  Prev: content-body,  Up: MIME display
  285.  
  286. content-separator
  287. =================
  288.  
  289.    *content-separator* is displayed to represent boundary of contents.
  290.  
  291.    Content-separator is displayed by function
  292. `mime-viewer/default-content-separator'.  In default, it displays
  293. line-break when content-header and content-body are not displayed.
  294.  
  295.    If you want to change this condition, please redefine this function.
  296.  
  297.  - Function: mime-viewer/default-content-separator RCNUM CINFO CTYPE
  298.           PARAMS SUBJ
  299.      Display content-separator.  CNUM is content-number of a content.
  300.      CINFO is content-info of the message.  CTYPE is content-type of a
  301.      content.  PARAMS is Content-Type field parameters of a content.
  302.      SUBJ is subject.
  303.  
  304.      In default, it displays line-break when content-header and
  305.      content-body are not displayed.
  306.  
  307. 
  308. File: tm-view-en.info,  Node: mime/viewer-mode,  Next: method,  Prev: MIME display,  Up: Top
  309.  
  310. Navigation in mime/viewer-mode
  311. ******************************
  312.  
  313.    `mime/viewer-mode' has following functions:
  314.  
  315. `<u>'
  316.      goes to the upper content (returns to the Summary mode if the
  317.      cursor is sitting on the top content (*1))
  318.  
  319. `<p>'
  320.      goes to the previous content
  321.  
  322. `<M-TAB>'
  323.      goes to the previous content
  324.  
  325. `<n>'
  326.      goes to the next content
  327.  
  328. `<TAB>'
  329.      goes to the next content
  330.  
  331. `<SPC>'
  332.      scrolls up
  333.  
  334. `<M-SPC>'
  335.      scrolls down
  336.  
  337. `<DEL>'
  338.      scrolls down
  339.  
  340. `<RET>'
  341.      goes to the next line
  342.  
  343. `<M-RET>'
  344.      goes to the previous line
  345.  
  346. `<<>'
  347.      goes to the beginning of message
  348.  
  349. `<>>'
  350.      goes to the end of message
  351.  
  352. `<v>'
  353.      playbacks a part (*2)
  354.  
  355. `<e>'
  356.      extracts a file from a part (*2)
  357.  
  358. `<C-c C-p>'
  359.      prints a part (*2)
  360.  
  361. `<f>'
  362.      displays X-Face in the message
  363.  
  364. `<mouse-button-2>'
  365.      drives mouse button in preview-buffer.
  366.  
  367.      For content-button, it playbacks a part (*2)
  368.  
  369.      For URL-button, it drives WWW browser
  370.  
  371. *[Notice]*
  372.      (*1) Not return to the Summary mode unless tm-view has been setup
  373.      using tm-mh-e, tm-vm, gnus-mime, tm-gnus, tm-rmail etc.
  374.  
  375.      (*2) Actual playback/extract/print will be performed by a method.
  376.  
  377. 
  378. File: tm-view-en.info,  Node: method,  Next: Two buffers for an article,  Prev: mime/viewer-mode,  Up: Top
  379.  
  380. Mechanism of decoding
  381. *********************
  382.  
  383.    In `mime/viewer-mode', you can do play (`v'), extract (`e'), or
  384. print (`C-c C-p') for each parts.  These operations are called
  385. *decoding operation(s) (for a part)*.  And kind of decoding operations
  386. are called *decoding-mode*.
  387.  
  388.    When decoding operation is driven, tm-view calls a procedure matched
  389. for the condition, such as content-type (*Note (tm-en)content-type::)
  390. of the part or its environment.  This procedure is called *method*.
  391.  
  392.    There are two kinds of methods.  One is Emacs Lisp function, called
  393. *internal method*.  Another one is external program, called *external
  394. method*.
  395.  
  396.    Internal method operates in Emacs, so it can do carefully.
  397.  
  398.    External method is called as asynchronous process, so Emacs does not
  399. wait while method is running.  So it is good for big data, such as
  400. audio, image or video.
  401.  
  402. * Menu:
  403.  
  404. * decoding-condition::          Setting decoding condition for parts
  405. * environment variables::       Environment variables
  406.  
  407. 
  408. File: tm-view-en.info,  Node: decoding-condition,  Next: environment variables,  Prev: method,  Up: method
  409.  
  410. Setting decoding condition for parts
  411. ====================================
  412.  
  413.    When decoding operation is driven, tm-view calls a method matched for
  414. the condition searched from the variable
  415. `mime/content-decoding-condition'.
  416.  
  417.    Variable `mime/content-decoding-condition' is defined as a list with
  418. the following syntax:
  419.  
  420.              (condition_1 condition_2 ...)
  421.  
  422.    Each condition are association-list with the following syntax:
  423.  
  424.              ((field-type_1 . value_1)
  425.               (field-type_2 . value_2)
  426.               ...)
  427.  
  428.    For example, if you want to call the external method named tm-plain
  429. to decode every text/plain (*Note (tm-en)text/plain::) type parts, you
  430. can define the condition like:
  431.  
  432.              ((type . "text/plain")
  433.               (method "tm-plain" nil 'file 'type 'encoding 'mode 'name))
  434.  
  435.    This condition definition will match all parts whose content-type
  436. (*Note (tm-en)content-type::) are text/plain.  Here is an another
  437. example:
  438.  
  439.              ((type . "text/plain")
  440.               (method "tm-plain" nil 'file 'type 'encoding 'mode 'name)
  441.               (mode . "play"))
  442.  
  443.    This will match the part whose type is text/plain and the mode is
  444. play.
  445.  
  446.    Here is an another example:
  447.  
  448.              ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file)
  449.               (mode . "play"))
  450.  
  451.    This will match all parts which have a mode of play.
  452.  
  453.    The conditions defined in a variable
  454. `mime/content-decoding-condition' are examined from top to bottom.  The
  455. first matching condition becomes valid and the method specified in that
  456. condition definition will be executed.
  457.  
  458. * Menu:
  459.  
  460. * method value::                Format of method value
  461. * Example of decoding-condition::
  462.  
  463. 
  464. File: tm-view-en.info,  Node: method value,  Next: Example of decoding-condition,  Prev: decoding-condition,  Up: decoding-condition
  465.  
  466. Format of method value
  467. ----------------------
  468.  
  469.    You can specify the method field of the decoding-condition
  470. definition in two different ways,
  471.  
  472.              (method . SYMBOL)
  473.  
  474. or
  475.  
  476.              (method  STRING  FLAG  arg1  arg2  ...)
  477.  
  478. can be accepted.
  479.  
  480.    When a symbol is specified in the method field, a function whose
  481. name is SYMBOL will be called as an internal method.
  482.  
  483.    When a list is specified in the method field, it will be called as an
  484. external method.
  485.  
  486.    The list below shows the meaning of the parameters when the external
  487. method is specified in the method field.
  488.  
  489. `STRING'
  490.      name of an external method
  491.  
  492. `FLAG'
  493.      If `t', both the content-header and the content-body are passed to
  494.      an external method.
  495.  
  496.      If `nil', only the content-body is passed to an external method.
  497.  
  498. `ARGUMENTs'
  499.      list of arguments passed to an external method
  500.  
  501.    An argument passed to an external method can be in one of the
  502. following formats:
  503.  
  504. `STRING'
  505.      string itself
  506.  
  507. `'SYMBOL'
  508.      value gotten using SYMBOL as a key from decoding-condition
  509.  
  510. `'STRING'
  511.      value gotten using STRING as a key from decoding-condition
  512.  
  513.    `'SYMBOL' can be one of the following:
  514.  
  515. `'file'
  516.      name of a file holding the original content
  517.  
  518. `'type'
  519.      content-type/sub-type of Content-Type field
  520.  
  521. `'encoding'
  522.      field body of Content-Transfer-Encoding field
  523.  
  524. `'mode'
  525.      decoding-mode
  526.  
  527. `'name'
  528.      name of a file created by decode operation
  529.  
  530.    `'STRING' is used to search a parameter of the Content-Type field
  531. whose name matches with it, and pass the value of that parameter to the
  532. external method.
  533.  
  534. 
  535. File: tm-view-en.info,  Node: Example of decoding-condition,  Prev: method value,  Up: decoding-condition
  536.  
  537. Example of decoding-condition
  538. -----------------------------
  539.  
  540.    Following is an example of decoding-condition:
  541.  
  542.      (defvar mime/content-decoding-condition
  543.        '(((type . "text/plain")
  544.           (method "tm-plain" nil 'file 'type 'encoding 'mode 'name))
  545.          ((type . "text/x-latex")
  546.           (method "tm-latex" nil 'file 'type 'encoding 'mode 'name))
  547.          ((type . "audio/basic")
  548.           (method "tm-au"    nil 'file 'type 'encoding 'mode 'name))
  549.          ((type . "image/gif")
  550.           (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
  551.          ((type . "image/jpeg")
  552.           (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
  553.          ((type . "image/tiff")
  554.           (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
  555.          ((type . "image/x-tiff")
  556.           (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
  557.          ((type . "image/x-xbm")
  558.           (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
  559.          ((type . "image/x-pic")
  560.           (method "tm-image" nil 'file 'type 'encoding 'mode 'name))
  561.          ((type . "video/mpeg")`
  562.           (method "tm-mpeg"  nil 'file 'type 'encoding 'mode 'name))
  563.          ((type . "application/octet-stream")
  564.           (method "tm-file"  nil 'file 'type 'encoding 'mode 'name))
  565.          ((type . "message/partial")
  566.           (method . mime/decode-message/partial-region))
  567.          ((method "metamail" t
  568.                   "-m" "tm" "-x" "-d" "-z" "-e" 'file)(mode . "play"))
  569.          ))
  570.  
  571.    For example, if you want to use metamail to decode any contents,
  572.  
  573.      (setq mime/content-decoding-condition
  574.            '(
  575.              ((method "metamail" t "-m" "tm" "-x" "-d" "-z" "-e" 'file))
  576.             ))
  577.  
  578. will work.
  579.  
  580.    Variable `mime/content-decoding-condition' provides you of very
  581. flexible way to define the conditions of decoding.  It can be simple if
  582. you only need the a few decoding methods, while it can be very
  583. complicated if you want to use the separate decoding method for each
  584. type/mode combination.
  585.  
  586.    Following function may be useful to set decoding-condition.  It is a
  587. function of `tl-atype.el'.
  588.  
  589.  - Function: set-atype SYMBOL ALIST
  590.      Add condition ALIST to SYMBOL.
  591.  
  592.      *[Example]*
  593.                (set-atype 'mime/content-decoding-condition
  594.                       '((type . "message/external-body")
  595.                         ("access-type" . "anon-ftp")
  596.                         (method . mime/decode-message/external-ftp)
  597.                         ))
  598.  
  599. 
  600. File: tm-view-en.info,  Node: environment variables,  Prev: decoding-condition,  Up: method
  601.  
  602. Environment variables
  603. =====================
  604.  
  605.    Standard methods of tm-view reference some environment variables.
  606. You can specify them to customize.
  607.  
  608. TM_TMP_DIR
  609.      Directory for temporary files or extracted files.  If it is
  610.      omitted, `/tmp/' is used.
  611.  
  612. VIDEO_DITHER
  613.      Dither for mpeg_play.  If it is omitted, `gray' is used.
  614.  
  615. TM_WWW_BROWSER
  616.      WWW browser name.  If it is omitted, `netscape' is used.
  617.  
  618. 
  619. File: tm-view-en.info,  Node: Two buffers for an article,  Next: API,  Prev: method,  Up: Top
  620.  
  621. raw-article-buffer and preview-buffer
  622. *************************************
  623.  
  624.    tm-view managements two buffers, one is for raw message called
  625. *raw-article-buffer*, another one is to preview for user called
  626. *preview-buffer*.  major-mode of raw-article-buffer is same as
  627. major-mode for article of original MUA, major-mode of preview-buffer is
  628. `mime/viewer-mode' (*Note mime/viewer-mode::).
  629.  
  630.    When called `mime/viewer-mode', tm-view analyzes raw-article-buffer,
  631. and sets its result to the variable `mime::article/content-info'.
  632.  
  633.    After that, tm-view create a preview-buffer corresponded to the
  634. raw-article-buffer.  As this time, tm-view modifies header and body of
  635. each parts of the message by specified conditions.  Filter program for
  636. header is called *header-filter* (*Note content-header::), filter
  637. program for body is called *content-filter* (*Note content-body::), and
  638. they are called *filter*.
  639.  
  640.    When preview-buffer is made, buffer local variable of preview-buffer
  641. `mime::preview/content-list' is made to register structure of
  642. preview-buffer.  tm-view manages message by
  643. `mime::article/content-info' in raw-article-buffer and
  644. `mime::preview/content-list' in preview-buffer.
  645.  
  646. *[Notice]*
  647.      In this document, I call "content-type" as content-type/subtype of
  648.      Content-Type field.
  649.  
  650. * Menu:
  651.  
  652. * raw-article-buffer::          buffer local variables of raw-article-buffer
  653. * preview-buffer::              Buffer local variables of preview-buffer
  654.  
  655. 
  656. File: tm-view-en.info,  Node: raw-article-buffer,  Next: preview-buffer,  Prev: Two buffers for an article,  Up: Two buffers for an article
  657.  
  658. buffer local variables of raw-article-buffer
  659. ============================================
  660.  
  661.  - Structure: mime::content-info RCNUM POINT-MIN POINT-MAX TYPE
  662.           PARAMETERS ENCODING CHILDREN
  663.      structure to represent MIME content in raw-article-buffer.  It is
  664.      called by *content-info*.
  665.  
  666.      Please use reference function `mime::content-info/SLOT-NAME' to
  667.      reference slot of content-info.  Their argument is only
  668.      content-info.
  669.  
  670.      Following is a list of slots of the structure:
  671.  
  672.     RCNUM
  673.           "reversed content-number" (list)
  674.  
  675.     POINT-MIN
  676.           beginning point of region in raw-article-buffer
  677.  
  678.     POINT-MAX
  679.           end point of region in raw-article-buffer
  680.  
  681.     TYPE
  682.           content-type/sub-type (string or nil)
  683.  
  684.     PARAMETERS
  685.           parameter of Content-Type field (association list)
  686.  
  687.     ENCODING
  688.           Content-Transfer-Encoding (string or nil)
  689.  
  690.     CHILDREN
  691.           parts included in this part (list of content-infos)
  692.  
  693.      If a part includes other parts in its contents, such as multipart
  694.      or message/rfc822, content-infos of other parts are included in
  695.      CHILDREN, so content-info become a tree.
  696.  
  697.  - Variable: mime::article/content-info
  698.      result of MIME parsing of raw-article-buffer (content-info)
  699.  
  700.  - Variable: mime::article/preview-buffer
  701.      preview-buffer corresponded by this buffer
  702.  
  703.  - Function: mime-article/point-content-number POINT &optional CINFO
  704.      In a region managed by content-info CINFO, it returns
  705.      content-number corresponded by POINT.
  706.  
  707.      If CINFO is omitted, `mime::article/content-info' is used as
  708.      default value.
  709.  
  710.  - Function: mime-article/rcnum-to-cinfo RCNUM &optional CINFO
  711.      In a region managed by content-info CINFO, it returns content-info
  712.      corresponded by reversed-content-number RCNUM.
  713.  
  714.      If CINFO is omitted, `mime::article/content-info' is used as
  715.      default value.
  716.  
  717.  - Function: mime-article/cnum-to-cinfo RCNUM &optional CINFO
  718.      In a region managed by content-info CINFO, it returns content-info
  719.      corresponded by content-number RCNUM.
  720.  
  721.      If CINFO is omitted, `mime::article/content-info' is used as
  722.      default value.
  723.  
  724.  - Function: mime/flatten-content-info &optional CINFO
  725.      It returns flatten list of content-info from content-info CINFO
  726.      tree.
  727.  
  728.      If CINFO is omitted, `mime::article/content-info' is used as
  729.      default value.
  730.  
  731. 
  732. File: tm-view-en.info,  Node: preview-buffer,  Prev: raw-article-buffer,  Up: Two buffers for an article
  733.  
  734. Buffer local variables of preview-buffer
  735. ========================================
  736.  
  737.  - Variable: mime::preview/mother-buffer
  738.      Mother buffer of this preview-buffer.
  739.  
  740.  - Structure: mime::preview-content-info POINT-MIN POINT-MAX BUFFER
  741.           CONTENT-INFO
  742.      structure to represent MIME content in preview-buffer.  It is
  743.      called by *preview-content-info*.
  744.  
  745.      Please use reference function
  746.      `mime::preview-content-info/SLOT-NAME' to reference slot of
  747.      preview-content-info.  Their argument is only preview-content-info.
  748.  
  749.      Following is a list of slots of the structure:
  750.  
  751.     POINT-MIN
  752.           beginning point of region in preview-buffer
  753.  
  754.     POINT-MAX
  755.           end point of region in preview-buffer
  756.  
  757.     BUFFER
  758.           raw-article-buffer corresponding a part
  759.  
  760.     CONTENT-INFO
  761.           content-info corresponding a part
  762.  
  763.  
  764.  - Variable: mime::preview/content-list
  765.      List of preview-content-info to represent structure of this
  766.      preview-buffer.
  767.  
  768.  - Variable: mime::preview/article-buffer
  769.      raw-article-buffer corresponded by this preview-buffer.
  770.  
  771.  - Variable: mime::preview/original-major-mode
  772.      major-mode of original buffer.
  773.  
  774.  - Variable: mime::preview/original-window-configuration
  775.      window-configuration just before made this preview-buffer.
  776.  
  777.  - Function: mime-preview/point-pcinfo POINT &optional PCL
  778.      In a region of preview-buffer managed by preview-content-info PCL,
  779.      it returns preview-content-info corresponded by POINT.
  780.  
  781.      If CINFO is omitted, `mime::preview/content-list' is used.
  782.  
  783. 
  784. File: tm-view-en.info,  Node: API,  Next: Acknowledgments,  Prev: Two buffers for an article,  Up: Top
  785.  
  786. Functions to decode MIME message
  787. ********************************
  788.  
  789.    tm-view provides some available functions to decode and navigate MIME
  790. message to each MUA (*Note (tm-en)MUA::)s.
  791.  
  792.    There are 2 kinds of functions, one is for MIME preview, another one
  793. is to decode RFC 1522 encoded-word (*Note (tm-en)encoded-word::).
  794.  
  795. * Menu:
  796.  
  797. * API about MIME preview::      Function to preview MIME message
  798. * encoded-word decoding::       encoded-word decoder
  799.  
  800. 
  801. File: tm-view-en.info,  Node: API about MIME preview,  Next: encoded-word decoding,  Prev: API,  Up: API
  802.  
  803. Function to preview MIME message
  804. ================================
  805.  
  806.  - Command: mime/viewer-mode &optional MOTHER CTL ENCODING IBUF OBUF
  807.           MOTHER-KEYMAP
  808.      Parse IBUF as a MIME message, and create preview-buffer into OBUF
  809.      to display to user, then enter `mime/viewer-mode' (*Note
  810.      mime/viewer-mode::).
  811.  
  812.      If IBUF is omitted, current buffer is used.
  813.  
  814.      MOTHER is used to specify original raw-article-buffer.  It may be
  815.      useful when a raw-article-buffer is assembled from message/partial
  816.      messages.
  817.  
  818.      CTL is used to specify Content-Type field (*Note
  819.      (tm-en)Content-Type field::) information.  Its format is output
  820.      format of `mime/Content-Type'.  When CTL is specified, tm-view
  821.      uses it instead of Content-Type field of the raw-article-buffer.
  822.  
  823.      ENCODING is used to specify field-body of
  824.      Content-Transfer-Encoding field.  When is is specified, tm-view
  825.      uses it instead of Content-Type field of the raw-article-buffer.
  826.  
  827.      If MOTHER-KEYMAP is specified, keymap of `mime/viewer-mode'
  828.      includes it.
  829.  
  830. 
  831. File: tm-view-en.info,  Node: encoded-word decoding,  Prev: API about MIME preview,  Up: API
  832.  
  833. encoded-word decoder
  834. ====================
  835.  
  836.    tm-view has functions to decode RFC 1522 encoded-word (*Note
  837. (tm-en)encoded-word::).
  838.  
  839.  - Command: mime/decode-message-header
  840.      It decodes encoded-words in message header of current buffer.
  841.  
  842.      If an encoded-word is broken or invalid, or it has non supported
  843.      MIME charset (*Note (tm-en)MIME charset::), it is not decoded.
  844.  
  845.  - Command: mime-eword/decode-region START END &optional UNFOLDING
  846.           MUST-UNFOLD
  847.      It decodes encoded-words in region START to END.
  848.  
  849.      If an encoded-word is broken or invalid, or it has non supported
  850.      MIME charset (*Note (tm-en)MIME charset::), it is not decoded.
  851.  
  852.      If UNFOLDING is non-nil, it unfolds folded fields.
  853.  
  854.      If MUST-FOLD is non-nil and decoded result of an encoded-word has
  855.      folding or raw CR or LF, it unfolds or delete raw CR or LF.
  856.  
  857.  - Function: mime-eword/decode-string STRING &optional MUST-UNFOLD
  858.      It decodes encoded-words in STRING and returns decoded string.
  859.  
  860.      If an encoded-word is broken or invalid, or it has non supported
  861.      MIME charset (*Note (tm-en)MIME charset::), it is not decoded.
  862.  
  863.      If STRING is folded, it unfolds STRING before decoding.
  864.  
  865.      If MUST-FOLD is non-nil and decoded result of an encoded-word has
  866.      folding or raw CR or LF, it unfolds or delete raw CR or LF.
  867.  
  868. 
  869. File: tm-view-en.info,  Node: Acknowledgments,  Next: Concept Index,  Prev: API,  Up: Top
  870.  
  871. Acknowledgments
  872. ***************
  873.  
  874.    First of all, I thank MASUTANI Yasuhiro.  He requested me a lot of
  875. important features and gave me a lot of suggestions when tm-view was
  876. born.  tm-view is based on his influence.
  877.  
  878.    I thank ENAMI Tsugutomo for work of `mime.el', which is an origin of
  879. `tm-ew-d.el' and `mel-b.el', and permission to rewrite for tm.
  880.  
  881.    I thank OKABE Yasuo for work of internal method for LaTeX and
  882. automatic assembling method for message/partial.  I thank UENO Hiroshi
  883. for work of internal method for tar archive.
  884.  
  885.    Last of all, I thank members of two tm mailing lists, Japanese and
  886. English version.
  887.  
  888. 
  889. File: tm-view-en.info,  Node: Concept Index,  Next: Function Index,  Prev: Acknowledgments,  Up: Top
  890.  
  891. Concept Index
  892. *************
  893.  
  894. * Menu:
  895.  
  896. * content-body:                          content-body.
  897. * content-filter <1>:                    Two buffers for an article.
  898. * content-filter:                        content-body.
  899. * content-header-filter:                 content-header.
  900. * content-info:                          raw-article-buffer.
  901. * content-number:                        content-button.
  902. * content-separator:                     content-separator.
  903. * decoding operation(s) (for a part):    method.
  904. * decoding-mode:                         method.
  905. * external method:                       method.
  906. * filter <1>:                            Two buffers for an article.
  907. * filter:                                Introduction.
  908. * header-filter:                         Two buffers for an article.
  909. * internal method:                       method.
  910. * method <1>:                            method.
  911. * method:                                Introduction.
  912. * preview-buffer:                        Two buffers for an article.
  913. * preview-content-info:                  preview-buffer.
  914. * raw-article-buffer:                    Two buffers for an article.
  915.  
  916. 
  917. File: tm-view-en.info,  Node: Function Index,  Next: Variable Index,  Prev: Concept Index,  Up: Top
  918.  
  919. Function Index
  920. **************
  921.  
  922. * Menu:
  923.  
  924. * mime-article/cnum-to-cinfo:            raw-article-buffer.
  925. * mime-article/point-content-number:     raw-article-buffer.
  926. * mime-article/rcnum-to-cinfo:           raw-article-buffer.
  927. * mime-eword/decode-region:              encoded-word decoding.
  928. * mime-eword/decode-string:              encoded-word decoding.
  929. * mime-preview/point-pcinfo:             preview-buffer.
  930. * mime-viewer/body-visible-p:            content-body.
  931. * mime-viewer/default-content-filter:    content-body.
  932. * mime-viewer/default-content-header-filter: content-header.
  933. * mime-viewer/default-content-separator: content-separator.
  934. * mime-viewer/header-visible-p:          content-header.
  935. * mime/decode-message-header:            encoded-word decoding.
  936. * mime/flatten-content-info:             raw-article-buffer.
  937. * mime/viewer-mode:                      API about MIME preview.
  938. * mime::content-info:                    raw-article-buffer.
  939. * mime::preview-content-info:            preview-buffer.
  940. * set-atype:                             Example of decoding-condition.
  941.  
  942. 
  943. File: tm-view-en.info,  Node: Variable Index,  Prev: Function Index,  Up: Top
  944.  
  945. Variable Index
  946. **************
  947.  
  948. * Menu:
  949.  
  950. * mime-viewer/childrens-header-showing-Content-Type-list: content-header.
  951. * mime-viewer/content-button-ignored-ctype-list: content-button.
  952. * mime-viewer/content-filter-alist:      content-body.
  953. * mime-viewer/content-header-filter-alist: content-header.
  954. * mime-viewer/default-showing-Content-Type-list: content-body.
  955. * mime-viewer/ignored-field-list:        content-header.
  956. * mime::article/content-info:            raw-article-buffer.
  957. * mime::article/preview-buffer:          raw-article-buffer.
  958. * mime::preview/article-buffer:          preview-buffer.
  959. * mime::preview/content-list:            preview-buffer.
  960. * mime::preview/mother-buffer:           preview-buffer.
  961. * mime::preview/original-major-mode:     preview-buffer.
  962. * mime::preview/original-window-configuration: preview-buffer.
  963.  
  964.  
  965. 
  966. Tag Table:
  967. Node: Top118
  968. Node: Introduction821
  969. Node: MIME display1665
  970. Node: content-button3953
  971. Node: content-header5665
  972. Node: content-body8299
  973. Node: content-separator10222
  974. Node: mime/viewer-mode11101
  975. Node: method12369
  976. Node: decoding-condition13475
  977. Node: method value15275
  978. Node: Example of decoding-condition17004
  979. Node: environment variables19576
  980. Node: Two buffers for an article20083
  981. Node: raw-article-buffer21634
  982. Node: preview-buffer24154
  983. Node: API25806
  984. Node: API about MIME preview26363
  985. Node: encoded-word decoding27533
  986. Node: Acknowledgments28958
  987. Node: Concept Index29672
  988. Node: Function Index30917
  989. Node: Variable Index32097
  990. 
  991. End Tag Table
  992.